package com.yibuBoot;

import com.redis.test03.TestMapper;
import com.shujuku.test1.ShujukuMapper;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.ibatis.session.defaults.DefaultSqlSession;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * 作者: LCG
 * 日期: 2020/3/8 18:39
 * 描述: 测试异步调用
 */

@RestController
public class TestYiBuQingQiuController {

    @Autowired
    private TestYiBuService testYiBuService;

    @RequestMapping("yibu")
    public String test00(){

        testYiBuService.testyiBu();

        return "ok";
    }


    @RequestMapping("yibu01")
    public String test01(){

        testYiBuService.testyiBu();

        return "ok";
    }


    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;


    @RequestMapping("test100")
    private void testMybatis() throws Exception {


        TestMapper mapper = sqlSessionTemplate.getMapper(TestMapper.class);

        mapper.getById(1L);

        System.out.println("===============");

    }

}
